package com.settlement.system.model.entity.common;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.settlement.system.converter.*;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.NotEmpty;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 唯品会账手工差异账单
 *
 * @author Ximi
 * @since 2020-04-17
 */
@Data
@ExcelIgnoreUnannotated
@HeadStyle(fillBackgroundColor = 9, fillForegroundColor = 9)
@HeadRowHeight(value = 20)
@HeadFontStyle(fontHeightInPoints = 14)
public class TblWpManualItemDiff extends BaseModel implements Serializable {


    /**
     * 全局唯一ID
     */
    @ExcelProperty(value = "唯一ID",converter = BigNumberTabFormatConvert.class)
    private String globalId;

    /**
     * 公司编码
     */
    private String companyNo;

    /**
     * 公司名称
     */
    private String companyName;

    /**
     * 店铺编码
     */
    @ExcelProperty(value = "店铺编码")
    @NotNull(message = "店铺编码不能为空")
    private String shopNo;

    /**
     * 店铺名称
     */
    @ExcelProperty(value = "店铺名称")
    private String shopName;

    /**
     * 收费项目
     */
    @ExcelProperty(value = "收费项目")
    private String feeItem;

    /**
     * 费用定义
     */
    @ExcelProperty(value = "费用定义")
    private String feeDef;

    /**
     * 部门
     */
    @ExcelProperty(value = "部门")
    private String dept;

    /**
     * 费用原因说明
     */
    @ExcelProperty(value = "费用原因说明")
    private String comments;

    /**
     * 确认金额
     */
    @ExcelProperty(value = "确认金额")
    @NotNull(message = "确认金额不能为空")
    private BigDecimal comfireAmount;

    /**
     * 销售单号
     */
    @NotNull(message = "销售单号不能为空")
    @ExcelProperty(value = "销售单号",converter = BigNumberTabFormatConvert.class)
    private String orderNum;

    /**
     * PO
     */
    @NotNull(message = "PO号不能为空")
    @ExcelProperty(value = "PO")
    private String poNo;

    /**
     * 流水号
     */
    @ExcelProperty(value = "流水号")
    private String seqNo;

    /**
     * 账单编码
     */
    @NotNull(message = "账单编码不能为空")
    @ExcelProperty(value = "账单编码")
    private String billNumber;

    /**
     * sku
     */
    @NotNull(message = "条码不能为空")
    @ExcelProperty(value = "条码",converter = BigNumberTabFormatConvert.class)
    private String barcode;


    @NotNull(message = "唯品发货类型不能为空")
    @ExcelProperty(value = "唯品发货类型")
    private String warehouseExt;


    /**
     * 退供单号
     */
    @ExcelProperty(value = "退供单号")
    private String saleReturnNumber;

    /**
     * 扣率
     */
    @ExcelProperty(value = "扣率")
    @ExcelIgnore
    private BigDecimal discountRate;

    /**
     * 凭证摘要FPP:首期（提前),FP:首期,AP:全款,TP:尾款
     */
    @ExcelProperty(value = "凭证摘要", converter = WpVoucherSummaryConvert.class)
    @ExcelIgnore
    private String voucherSummary;

    /**
     * 开票税率
     */
    @ExcelProperty(value = "开票税率")
    @ExcelIgnore
    private BigDecimal taxRate;

    /**
     * 档期
     */
    @ExcelProperty(value = "档期")
    @ExcelIgnore
    private String calendar;

    /**
     * 暂估金额
     */
    @ExcelProperty(value = "暂估40%")
    @ExcelIgnore
    private BigDecimal estimateAmount;

    /**
     * 入账数量
     */
    @NotNull(message = "入账数量不能为空")
    @ExcelProperty(value = "入账数量")
    private BigDecimal enterQty;

    /**
     * NC收入
     */
    @ExcelProperty(value = "NC收入")
    @ExcelIgnore
    private BigDecimal amount;

    /**
     * 100%数量
     */
    @NotNull(message = "100%数量不能为空")
    @ExcelProperty(value = "100%数量")
    private BigDecimal allQty;

    /**
     * 100%收入
     */
    @ExcelProperty(value = "100%收入")
    @ExcelIgnore
    private BigDecimal allAmount;

    /**
     * 100%终端收入
     */
    @ExcelProperty(value = "100%终端收入")
    @ExcelIgnore
    private BigDecimal allTerminalAmount;

    /**
     * 100%平台扣费
     */
    @ExcelProperty(value = "100%平台扣费")
    @ExcelIgnore
    private BigDecimal allPlatformAmount;

    /**
     * 品牌编码
     */
    private String brandNo;

    /**
     * 品牌名称
     */
    @ExcelProperty(value = "品牌简称")
    private String brandName;

    /**
     * 商品编码
     */
    private String itemNo;

    /**
     * 备注（应收）
     */
    @ExcelProperty(value = "备注（应收）")
    @ExcelIgnore
    private String remark;

    /**
     * 采购单号条码
     */
    private String poItemNo;

    /**
     * 销售日期
     */
    @ExcelProperty(value = "销售日期", converter = DateFormatConvert.class)
    @ExcelIgnore
    private Date sendDate;

    /**
     * 结算期间
     */
    @ExcelProperty(value = "结算期间")
    @ExcelIgnore
    private String settleAccountPeriod;

    /**
     * 入账月份
     */
    @ExcelProperty(value = "入账月份")
    @ExcelIgnore
    private String entryAccountMonth;

    /**
     * 结算月份
     */
    @ExcelProperty(value = "结算月份")
    @ExcelIgnore
    private String settleAccountMonth;

    /**
     * 账单类别　M 月结账单，P 进度账单 ，H 人工账单，T 经销账单，TGCY 退供差异账单
     */

    @ExcelProperty(value = "账单类别", converter = WpBillNumberTypeConvert.class)
    @ExcelIgnore
    private String billNumberType;

    /**
     * 账单明细 1:销售明细 2:客退明细 3:其他明细
     */
    @ExcelProperty(value = "帐单类型", converter = WpOrderTypeConvert.class)
    @ExcelIgnore
    private Integer orderType;

    /**
     * 差异类别
     */
    @ExcelProperty(value = "差异类别", converter = WpDiffTypeConvert.class)
    @NotNull(message = "差异类别不能为空")
    private String diffType;

    /**
     * 大类
     */
    private String category;

    /**
     * 大类名称
     */
    @ExcelProperty(value = "大类")
    @ExcelIgnore
    private String categoryName;

    /**
     * 进度状态
     */
    private String processStatus;

    /**
     * 分库字段
     */
    private String shardingFlag;

    /**
     * JITX发货方式
     */
    @ExcelProperty(value = "JITX发货方式")
    private String poWarehouseType;

    /**
     * 发货模式
     */
    @ExcelProperty(value = "发货模式",converter = WpDeliveryTypeConvert.class)
    @NotNull(message = "发货模式不能为空")
    private Integer deliveryType;

    /**
     * 采购单号条码
     */
    @ExcelProperty(value = "采购单号条码")
    private String poSku;

    /**
     * 发货单价
     */
    @ExcelProperty(value = "发货单价")
    private BigDecimal price;

    /**
     * 发货单价
     */
    @ExcelProperty(value = "价格差异")
    private BigDecimal priceDif;

    /**
     * 采购档期编号
     */
    @ExcelProperty(value = "采购档期编号")
    private String scheduleId;

    /**
     * 唯品品牌部名称
     */
    @NotEmpty(message = "唯品品牌部名称不能为空")
    @ExcelProperty(value = "唯品品牌部名称")
    private String wpBrandName;

}
